﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.CCUiMlmSingleLocationManipulationDlg
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using DnProcessSimulateCommands.MultipleLocationsManipulation;
using EngineeringInternalExtension;
using EngineeringInternalExtension.ModelObjects;
using System;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using Tecnomatix.Engineering;
using Tecnomatix.Engineering.PrivateImplementationDetails;
using Tecnomatix.Engineering.Ui;
using UiInternalControls;


namespace DnProcessSimulateCommands;

public class CCUiMlmSingleLocationManipulationDlg : TxForm
{
  private CApMlmSharedLogic _sharedLogic;
  private CApMlmPlacementManipulator _placementManipulator;
  private TxTransformation _originalAbsoluteLocationTransformation;
  private TxTransformation _originalProjectedLocationTransformation;
  private TxPickLevelEx _originalPickLevel;
  private double _trackerMultiplier = 1.0;
  private double _positiveTrackerLimit;
  private double _negativeTrackerLimit;
  private TxTransformation _currentReferenceFrame;
  private string _currentReferenceFrameName;
  private bool isFrameOfReferenceValid;
  private const bool _DEBUG = false;
  private bool initializing;
  private bool _manipulateViaPlacement;
  private bool m_continuousTransactionRunning;
  private TxTypeFilter weldSeamLocOp;
  private IContainer components;
  private TxLocationNavigator txlnNavigator;
  private RadioButton rbRotation;
  private RadioButton rbTranslation;
  private TxButtonComboBox txbcbApplyAxis;
  private ImageList ilSmallButtonsImages;
  private ImageList ilLargeButtonsImages;
  private ToolTip ttButtonsTooltip;
  private TrackBar tbValueTracker;
  private Button btnReset;
  private Button btnClose;
  private CheckBox cbFollowMode;
  private RadioButton rbX;
  private RadioButton rbY;
  private RadioButton rbZ;
  private Panel panel1;
  private Panel panel2;
  private Label lblMin;
  private Label lblMax;
  private TxToolStrip tsSLM;
  private TxToolStripButton tsbResetLocationsAbsoluteLocation;
  private TxToolStripButton tsbSnapLocationsToMaxAllowed;
  private ToolStripSeparator toolStripSeparator1;
  private TxToolStripButton tsbShowCone;
  private TxToolStripDropDownButton toolStripDropDownButton1;
  private TxToolStripMenuItem tsbFlipLocation1;
  private TxToolStripMenuItem tsbFlipLocation2;
  private GroupBox groupBox1;
  private GroupBox groupBox2;
  private RadioButton m_relativeToOriginalProjectionRdBtn;
  private TxFrameComboBoxCtrl m_txFrameComboBoxCtrlRelative;
  private RadioButton m_relativeToFrameRdBtn;
  private RadioButton m_relativeToSelfFrameRdBtn;
  private TxValueStep txvsValueStep;

  private TxTransformation currentReferenceFrame
  {
    get
    {
      if (this.m_relativeToSelfFrameRdBtn.Checked)
        return (TxTransformation) null;
      return this.m_relativeToOriginalProjectionRdBtn.Checked ? this._originalProjectedLocationTransformation : this._currentReferenceFrame;
    }
  }

  private TxTypeFilter WeldSeamLocationOperation
  {
    get
    {
      if (this.weldSeamLocOp == null)
        this.weldSeamLocOp = new TxTypeFilter(new Type[2]
        {
          typeof (TxRoboticSeamLocationOperation),
          typeof (TxWeldLocationOperation)
        });
      return this.weldSeamLocOp;
    }
  }

  private void InitLocationNavigator()
  {
    // ISSUE: unable to decompile the method.
  }

  public CCUiMlmSingleLocationManipulationDlg()
  {
    this._originalPickLevel = TxGraphicViewerEx.PickLevel;
    this.txlnNavigator = new TxLocationNavigator();
    this.InitializeComponent();
    this.txvsValueStep.ContinuousValueChangeStarted += new EventHandler(this.TxvsValueStep_ContinuousValueChangeStarted);
    this.txvsValueStep.ContinuousValueChangeEnded += new EventHandler(this.TxvsValueStep_ContinuousValueChangeEnded);
    ((Form) this).CancelButton = (IButtonControl) this.btnClose;
    this._placementManipulator = new CApMlmPlacementManipulator(new Action(this._placementManipulator_ElementPicked));
    this._sharedLogic = new CApMlmSharedLogic();
    this._sharedLogic.InitializeFollowMode();
    this.InitLocationNavigator();
    this.m_txFrameComboBoxCtrlRelative.ValidFrameSet += new TxFrameComboBoxCtrl_ValidFrameSetEventHandler(this.m_txFrameComboBoxCtrlRelative_ValidFrameSet);
    this.m_txFrameComboBoxCtrlRelative.InvalidFrameSet += new TxFrameComboBoxCtrl_InvalidFrameSetEventHandler(this.m_txFrameComboBoxCtrlRelative_InvalidFrameSet);
    ((Control) this.m_txFrameComboBoxCtrlRelative).LostFocus += new EventHandler(this.m_txFrameComboBoxCtrlRelative_LostFocus);
    this.tsbResetLocationsAbsoluteLocation.SetImage(TxImageManager.GetImageByKey("ResetAbsoluteLocation"));
    this.tsbSnapLocationsToMaxAllowed.SetImage(TxImageManager.GetImageByKey("SnapToMaximumAllowed"));
    this.toolStripDropDownButton1.SetImage(TxImageManager.GetImageByKey("FlipLocations"));
    this.tsbFlipLocation1.SetImage(TxImageManager.GetImageByKey("FlipLocations"));
    this.tsbFlipLocation2.SetImage(TxImageManager.GetImageByKey("FlipLocationsOnSolid"));
    this.tsbShowCone.SetImage(TxImageManager.GetImageByKey("ShowLocationLimits"));
    this.cbFollowMode.Image = TxImageManager.GetImageByKey("FollowMode").ConvertTo<Image>(new Size());
  }

  private void InitializeApplyAxisActions()
  {
    if (TxControlsDesignModeExtensions.IsInDesignMode((Form) this))
      return;
    this.txbcbApplyAxis.ClearActions();
    string str1 = "";
    string str2 = "";
    string str3 = "";
    if (this.txlnNavigator.LocationObject != null)
    {
      if (this.txlnNavigator.LocationObject is TxRoboticSeamLocationOperation)
      {
        str1 = MlmStringTable.MLM_APPLY_ROTATION_AXIS_NORMAL;
        str3 = MlmStringTable.MLM_APPLY_ROTATION_AXIS_MOVEMENT;
        str2 = MlmStringTable.MLM_APPLY_ROTATION_AXIS_THIRD_AXIS;
      }
      else if (this.txlnNavigator.LocationObject is TxWeldLocationOperation)
      {
        str1 = MlmStringTable.MLM_APPLY_ROTATION_AXIS_PERPENDICULAR;
        str3 = MlmStringTable.MLM_APPLY_ROTATION_AXIS_APPROACH;
        str2 = MlmStringTable.MLM_APPLY_ROTATION_AXIS_THIRD_AXIS;
      }
      else
      {
        ((Control) this.txbcbApplyAxis).Enabled = false;
        this.UpdateTrackBarLimits();
        this.UpdateTrackbarValue();
        return;
      }
    }
    ((Control) this.txbcbApplyAxis).Enabled = true;
    if (this.rbRotation.Checked)
    {
      ButtonAction buttonAction1 = new ButtonAction(str1, TxImageManager.GetImageByKey("Perpendicular"));
      ButtonAction buttonAction2 = new ButtonAction(str3, TxImageManager.GetImageByKey("Approach"));
      ButtonAction buttonAction3 = new ButtonAction(str2, TxImageManager.GetImageByKey("ThirdAxis"));
      this.txbcbApplyAxis.AddAction(buttonAction1);
      this.txbcbApplyAxis.AddAction(buttonAction2);
      this.txbcbApplyAxis.AddAction(buttonAction3);
    }
    else
      this.txbcbApplyAxis.AddAction(new ButtonAction(str1, this.ilLargeButtonsImages.Images[3]));
    this.txbcbApplyAxis.SelectedAction = 0;
  }

  private void txlnNavigator_LocationChanged(object sender, EventArgs args)
  {
    if (!this.CanManipulateArcLocation(this.txlnNavigator.LocationObject as ITxRoboticLocationOperation))
    {
      ((Form) this).Close();
    }
    else
    {
      this.EnableOrDisableControls();
      this.RefreshAxes();
      this.RefreshAvailableAxes();
      this.RefreshPlacementManipulatorAxes();
      this.ResetTrackbarValue();
      this._sharedLogic.RobotFollowMode(this.txlnNavigator.LocationObject, this.cbFollowMode.Checked);
      this._sharedLogic.ResetGunAndRobotPose();
      if (this.txlnNavigator.LocationObject != null)
      {
        this._originalAbsoluteLocationTransformation = new TxTransformation((this.txlnNavigator.LocationObject as ITxLocatableObject).AbsoluteLocation);
        if (this.txlnNavigator.LocationObject is TxWeldLocationOperation)
          this._originalProjectedLocationTransformation = new TxTransformation((this.txlnNavigator.LocationObject as TxWeldLocationOperation).ProjectedLocation);
        else if (this.txlnNavigator.LocationObject is TxRoboticSeamLocationOperation)
          this._originalProjectedLocationTransformation = new TxTransformation((this.txlnNavigator.LocationObject as TxRoboticSeamLocationOperation).ProjectedLocation);
      }
      else
      {
        this._originalAbsoluteLocationTransformation = (TxTransformation) null;
        this._originalProjectedLocationTransformation = (TxTransformation) null;
      }
      this._sharedLogic.UpdateProjectionFrame(this.IsWeldOrSeamLocationOperation(this.txlnNavigator.LocationObject) && this.m_relativeToOriginalProjectionRdBtn.Checked, this._originalProjectedLocationTransformation);
      this.RefreshFollowMode();
      this._sharedLogic.Location = (ITxLocationOperation) (this.txlnNavigator.LocationObject as ITxRoboticLocationOperation);
      bool flag = this._sharedLogic.CanHaveProjection();
      ((ToolStripItem) this.tsbResetLocationsAbsoluteLocation).Enabled = flag;
      ((ToolStripItem) this.tsbSnapLocationsToMaxAllowed).Enabled = flag;
      ((ToolStripItem) this.tsbShowCone).Enabled = flag;
    }
  }

  private void txbcbApplyAxis_FireAction(object sender, FireActionEventArgs args)
  {
    if (this.txlnNavigator.LocationObject != null)
    {
      ReferenceAxis selectedAxis = CApMlmSharedLogic.GetSelectedAxis(this.txlnNavigator.LocationObject, args.Action);
      if (selectedAxis == null)
        this.rbX.Checked = true;
      else if (selectedAxis == 1)
        this.rbY.Checked = true;
      else if (selectedAxis == 2)
        this.rbZ.Checked = true;
    }
    this.UpdateTrackBarLimits();
    this.UpdateTrackbarValue();
  }

  private void rbRotation_CheckedChanged(object sender, EventArgs e)
  {
    this.RefreshAxes();
    this.RefreshAvailableAxes();
    this.RefreshPlacementManipulatorAxes();
  }

  private void rbTranslation_CheckedChanged(object sender, EventArgs e)
  {
    this.RefreshAxes();
    this.RefreshAvailableAxes();
    this.RefreshPlacementManipulatorAxes();
  }

  private void RefreshAvailableAxes()
  {
    if (this.txlnNavigator.LocationObject == null)
    {
      this.rbX.Enabled = this.rbY.Enabled = this.rbZ.Enabled = false;
      ((Control) this.txbcbApplyAxis).Enabled = false;
    }
    else
    {
      if (!(this.txlnNavigator.LocationObject is TxWeldLocationOperation) && !(this.txlnNavigator.LocationObject is TxRoboticSeamLocationOperation))
      {
        this.rbX.Enabled = this.rbY.Enabled = this.rbZ.Enabled = true;
        ((Control) this.txbcbApplyAxis).Enabled = false;
      }
      else if (this.rbRotation.Checked)
      {
        this.rbX.Enabled = this.rbY.Enabled = this.rbZ.Enabled = true;
        ((Control) this.txbcbApplyAxis).Enabled = true;
      }
      else if (this.txlnNavigator.LocationObject is TxWeldLocationOperation)
        this.rbX.Enabled = this.rbY.Enabled = this.rbZ.Enabled = true;
      else if (this.txlnNavigator.LocationObject is TxRoboticSeamLocationOperation)
      {
        this.rbX.Enabled = this.rbY.Enabled = this.rbZ.Enabled = false;
        switch ((int) TxApplication.Options.Continuous.Normal)
        {
          case 0:
          case 3:
            this.rbX.Enabled = true;
            break;
          case 1:
          case 4:
            this.rbY.Enabled = true;
            break;
          case 2:
          case 5:
            this.rbZ.Enabled = true;
            break;
        }
        ((Control) this.txbcbApplyAxis).Enabled = true;
      }
      this.RefreshAxesTooltips();
    }
  }

  private void RefreshAxesTooltips()
  {
    if (this.rbRotation.Checked)
    {
      this.ttButtonsTooltip.SetToolTip((Control) this.rbX, string.Format(MlmStringTable.SelectAxisForRotation, (object) MlmStringTable.MLM_AXIS_X));
      this.ttButtonsTooltip.SetToolTip((Control) this.rbY, string.Format(MlmStringTable.SelectAxisForRotation, (object) MlmStringTable.MLM_AXIS_Y));
      this.ttButtonsTooltip.SetToolTip((Control) this.rbZ, string.Format(MlmStringTable.SelectAxisForRotation, (object) MlmStringTable.MLM_AXIS_Z));
    }
    else
    {
      this.ttButtonsTooltip.SetToolTip((Control) this.rbX, string.Format(MlmStringTable.SelectAxisForTranslation, (object) MlmStringTable.MLM_AXIS_X));
      this.ttButtonsTooltip.SetToolTip((Control) this.rbY, string.Format(MlmStringTable.SelectAxisForTranslation, (object) MlmStringTable.MLM_AXIS_Y));
      this.ttButtonsTooltip.SetToolTip((Control) this.rbZ, string.Format(MlmStringTable.SelectAxisForTranslation, (object) MlmStringTable.MLM_AXIS_Z));
    }
  }

  private void RefreshAxes()
  {
    this.InitializeApplyAxisActions();
    if (this.rbRotation.Checked)
    {
      this.rbX.Text = MlmStringTable.MLM_AXIS_RX;
      this.rbY.Text = MlmStringTable.MLM_AXIS_RY;
      this.rbZ.Text = MlmStringTable.MLM_AXIS_RZ;
      this.txvsValueStep.Type = TxValueStepType.Angular;
    }
    else
    {
      this.rbX.Text = MlmStringTable.MLM_AXIS_X;
      this.rbY.Text = MlmStringTable.MLM_AXIS_Y;
      this.rbZ.Text = MlmStringTable.MLM_AXIS_Z;
      this.txvsValueStep.Type = TxValueStepType.Linear;
    }
  }

  private void RefreshPlacementManipulatorAxes()
  {
    if (this._manipulateViaPlacement)
      return;
    TxPlacementManipulatorElement manipulatorElement = (TxPlacementManipulatorElement) 0;
    if (this.rbX.Checked)
      manipulatorElement = this.rbRotation.Checked ? (TxPlacementManipulatorElement) 2 : (TxPlacementManipulatorElement) 1;
    else if (this.rbY.Checked)
      manipulatorElement = this.rbRotation.Checked ? (TxPlacementManipulatorElement) 5 : (TxPlacementManipulatorElement) 4;
    else if (this.rbZ.Checked)
      manipulatorElement = this.rbRotation.Checked ? (TxPlacementManipulatorElement) 8 : (TxPlacementManipulatorElement) 7;
    this._placementManipulator.SelectedAxis = manipulatorElement;
  }

  private void rbX_CheckedChanged(object sender, EventArgs e)
  {
    this.txvsValueStep.QuietlyUpdateValue(0.0);
    this.UpdateTrackBarLimits();
    this.UpdateTrackbarValue();
    if (this._manipulateViaPlacement)
      return;
    this._placementManipulator.SelectedAxis = this.rbRotation.Checked ? (TxPlacementManipulatorElement) 2 : (TxPlacementManipulatorElement) 1;
  }

  private void rbY_CheckedChanged(object sender, EventArgs e)
  {
    this.txvsValueStep.QuietlyUpdateValue(0.0);
    this.UpdateTrackBarLimits();
    this.UpdateTrackbarValue();
    if (this._manipulateViaPlacement)
      return;
    this._placementManipulator.SelectedAxis = this.rbRotation.Checked ? (TxPlacementManipulatorElement) 5 : (TxPlacementManipulatorElement) 4;
  }

  private void rbZ_CheckedChanged(object sender, EventArgs e)
  {
    this.txvsValueStep.QuietlyUpdateValue(0.0);
    this.UpdateTrackBarLimits();
    this.UpdateTrackbarValue();
    if (this._manipulateViaPlacement)
      return;
    this._placementManipulator.SelectedAxis = this.rbRotation.Checked ? (TxPlacementManipulatorElement) 8 : (TxPlacementManipulatorElement) 7;
  }

  private void CCUiMlmSingleLocationManipulationDlg_Load(object sender, EventArgs e)
  {
    if (TxControlsDesignModeExtensions.IsInDesignMode((Form) this))
      return;
    this.initializing = true;
    this.InitializeApplyAxisActions();
    this.RefreshAxes();
    this.RefreshAvailableAxes();
    this.RefreshPlacementManipulatorAxes();
    this.LoadStepSize();
    this.LoadFollowMode();
    this.EnableOrDisableControls();
    this._sharedLogic.FillFrameComboBox(this.m_txFrameComboBoxCtrlRelative);
    bool flag = this._sharedLogic.CanHaveProjection();
    ((ToolStripItem) this.tsbResetLocationsAbsoluteLocation).Enabled = flag;
    ((ToolStripItem) this.tsbSnapLocationsToMaxAllowed).Enabled = flag;
    ((ToolStripItem) this.tsbShowCone).Enabled = flag;
    this.initializing = false;
  }

  private void CCUiMlmSingleLocationManipulationDlg_FormClosed(object sender, FormClosedEventArgs e)
  {
    TxGraphicViewerEx.PickLevel = this._originalPickLevel;
  }

  private void CCUiMlmSingleLocationManipulationDlg_FormClosing(
    object sender,
    FormClosingEventArgs e)
  {
    this.StoreStepSize();
    this.StoreFollowMode();
    this._sharedLogic.DestroyGhostGun();
    this._placementManipulator.Deactivate();
    this._sharedLogic.ShowConeManipulator = false;
    this._sharedLogic.Dispose();
  }

  private void btnClose_Click(object sender, EventArgs e) => ((Form) this).Close();

  private void EnableOrDisableControls()
  {
    bool focus = this.txlnNavigator.LocationObject != null;
    this.rbRotation.Enabled = this.rbTranslation.Enabled = this.tbValueTracker.Enabled = ((Control) this.txvsValueStep).Enabled = this.lblMax.Enabled = this.lblMin.Enabled = this.cbFollowMode.Enabled = this.btnReset.Enabled = this.m_relativeToSelfFrameRdBtn.Enabled = this.m_relativeToFrameRdBtn.Enabled = focus;
    bool flag = this.IsWeldOrSeamLocationOperation(this.txlnNavigator.LocationObject);
    if (!flag && this.m_relativeToOriginalProjectionRdBtn.Checked && this.m_relativeToSelfFrameRdBtn.Enabled)
      this.m_relativeToSelfFrameRdBtn.Checked = true;
    this.m_relativeToOriginalProjectionRdBtn.Enabled = flag;
    if (focus && this.m_relativeToFrameRdBtn.Checked)
      this.RefFrameLoseGainFocus(focus);
    else
      this.RefFrameLoseGainFocus(false);
  }

  private void cbFollowMode_Click(object sender, EventArgs e)
  {
    CApMlmSharedLogic.SetActiveControlState(this.cbFollowMode);
    this.RefreshFollowMode();
  }

  private void RefreshFollowMode()
  {
    bool flag = this.cbFollowMode.Checked;
    this._sharedLogic.FollowMode(flag);
    this._sharedLogic.RobotFollowMode(this.txlnNavigator.LocationObject, flag);
    this.RefreshManipulatorDisplay();
  }

  private void TxvsValueStep_ContinuousValueChangeEnded(object sender, EventArgs e)
  {
    if (!this.m_continuousTransactionRunning)
      return;
    TxApplication.ActiveUndoManager.EndTransaction();
    this.m_continuousTransactionRunning = false;
  }

  private void TxvsValueStep_ContinuousValueChangeStarted(object sender, EventArgs e)
  {
    if (this.m_continuousTransactionRunning)
      return;
    TxApplication.ActiveUndoManager.StartTransaction();
    this.m_continuousTransactionRunning = true;
  }

  private void txvsValueStep_ValueChanged(object sender, TxValueStepValueChangeEventArg args)
  {
    double oldX = 0.0;
    double newX = 0.0;
    double oldY = 0.0;
    double newY = 0.0;
    double oldZ = 0.0;
    double newZ = 0.0;
    double oldRx = 0.0;
    double newRx = 0.0;
    double oldRy = 0.0;
    double newRy = 0.0;
    double oldRz = 0.0;
    double newRz = 0.0;
    if (this.rbTranslation.Checked)
    {
      if (this.rbX.Checked)
      {
        oldX = args.OldValue;
        newX = args.NewValue;
      }
      else if (this.rbY.Checked)
      {
        oldY = args.OldValue;
        newY = args.NewValue;
      }
      else if (this.rbZ.Checked)
      {
        oldZ = args.OldValue;
        newZ = args.NewValue;
      }
    }
    else if (this.rbRotation.Checked)
    {
      if (this.rbX.Checked)
      {
        oldRx = args.OldValue;
        newRx = args.NewValue;
      }
      else if (this.rbY.Checked)
      {
        oldRy = args.OldValue;
        newRy = args.NewValue;
      }
      else if (this.rbZ.Checked)
      {
        oldRz = args.OldValue;
        newRz = args.NewValue;
      }
    }
    this.Manipulate(oldX, newX, oldY, newY, oldZ, newZ, oldRx, newRx, oldRy, newRy, oldRz, newRz);
  }

  private void LogIt() => this.LogIt("", "", 0.0, 0.0, "", 0.0);

  private void LogIt(
    string rotOrTran,
    string axis,
    double oldValue,
    double newValue,
    string result,
    double displayValue)
  {
  }

  private void GetOldNewValues(
    double oldX,
    double newX,
    double oldY,
    double newY,
    double oldZ,
    double newZ,
    double oldRx,
    double newRx,
    double oldRy,
    double newRy,
    double oldRz,
    double newRz,
    out double oldValue,
    out double newValue,
    out string axisName)
  {
    oldValue = newValue = -1.0;
    axisName = "";
    if (this.rbTranslation.Checked)
    {
      if (this.rbX.Checked)
      {
        oldValue = oldX;
        newValue = newX;
        axisName = "X";
      }
      else if (this.rbY.Checked)
      {
        oldValue = oldY;
        newValue = newY;
        axisName = "Y";
      }
      else
      {
        if (!this.rbZ.Checked)
          return;
        oldValue = oldZ;
        newValue = newZ;
        axisName = "Z";
      }
    }
    else
    {
      if (!this.rbRotation.Checked)
        return;
      if (this.rbX.Checked)
      {
        oldValue = oldRx;
        newValue = newRx;
        axisName = "Rx";
      }
      else if (this.rbY.Checked)
      {
        oldValue = oldRy;
        newValue = newRy;
        axisName = "Ry";
      }
      else
      {
        if (!this.rbZ.Checked)
          return;
        oldValue = oldRz;
        newValue = newRz;
        axisName = "Rz";
      }
    }
  }

  private void GetDeltaValues(
    double deltaX,
    double deltaY,
    double deltaZ,
    double deltaRx,
    double deltaRy,
    double deltaRz,
    out double deltaValue)
  {
    deltaValue = 0.0;
    if (this.rbTranslation.Checked)
    {
      if (this.rbX.Checked)
        deltaValue = deltaX;
      else if (this.rbY.Checked)
      {
        deltaValue = deltaY;
      }
      else
      {
        if (!this.rbZ.Checked)
          return;
        deltaValue = deltaZ;
      }
    }
    else
    {
      if (!this.rbRotation.Checked)
        return;
      if (this.rbX.Checked)
        deltaValue = deltaRx;
      else if (this.rbY.Checked)
      {
        deltaValue = deltaRy;
      }
      else
      {
        if (!this.rbZ.Checked)
          return;
        deltaValue = deltaRz;
      }
    }
  }

  private void Manipulate(
    double oldX,
    double newX,
    double oldY,
    double newY,
    double oldZ,
    double newZ,
    double oldRx,
    double newRx,
    double oldRy,
    double newRy,
    double oldRz,
    double newRz)
  {
    ITxLocationOperation locationObject = this.txlnNavigator.LocationObject;
    if (locationObject == null)
      return;
    TxLocationManipulationEx locationManipulationEx = new TxLocationManipulationEx((ITxObject) locationObject, true, true);
    TxTransformation absoluteLocation1 = (locationObject as ITxLocatableObject).AbsoluteLocation;
    double deltaX = newX - oldX;
    double deltaY = newY - oldY;
    double deltaZ = newZ - oldZ;
    double deltaRx = newRx - oldRx;
    double deltaRy = newRy - oldRy;
    double deltaRz = newRz - oldRz;
    bool flag1 = !TxDoubleExtension.AlmostEquals(deltaX, 0.0) || !TxDoubleExtension.AlmostEquals(deltaY, 0.0) || !TxDoubleExtension.AlmostEquals(deltaZ, 0.0);
    bool flag2 = !TxDoubleExtension.AlmostEquals(deltaRx, 0.0) || !TxDoubleExtension.AlmostEquals(deltaRy, 0.0) || !TxDoubleExtension.AlmostEquals(deltaRz, 0.0);
    string rotOrTran = (flag1 ? "T" : "") + (flag2 ? "R" : "");
    string axisName = "";
    double num1;
    double deltaValue = num1 = 0.0;
    double newValue = num1;
    double oldValue = num1;
    this.GetOldNewValues(oldX, newX, oldY, newY, oldZ, newZ, oldRx, newRx, oldRy, newRy, oldRz, newRz, out oldValue, out newValue, out axisName);
    this._sharedLogic.LastGunAndRobotOnLocationState = CApMlmSharedLogic.eGunAndRobotOnLocationState.None;
    LocationNewStatus locationNewStatus;
    if (flag2)
    {
      double num2 = deltaRx * TxApplication.Options.Units.AngularMultiplier;
      double num3 = deltaRy * TxApplication.Options.Units.AngularMultiplier;
      deltaRz *= TxApplication.Options.Units.AngularMultiplier;
      locationManipulationEx.GetMaxAllowedRotationDelta(ref num2, ref num3, ref deltaRz);
      locationNewStatus = this.Rotate(oldRx, newRx, oldRy, newRy, oldRz, newRz);
      deltaRx = num2 / TxApplication.Options.Units.AngularMultiplier;
      deltaRy = num3 / TxApplication.Options.Units.AngularMultiplier;
      deltaRz /= TxApplication.Options.Units.AngularMultiplier;
    }
    else
    {
      deltaX *= TxApplication.Options.Units.LinearMultiplier;
      double num4 = deltaY * TxApplication.Options.Units.LinearMultiplier;
      double num5 = deltaZ * TxApplication.Options.Units.LinearMultiplier;
      locationManipulationEx.GetMaxAllowedTranslationDelta(this.currentReferenceFrame, ref deltaX, ref num4, ref num5);
      locationNewStatus = this.Translate(oldX, newX, oldY, newY, oldZ, newZ);
      deltaX /= TxApplication.Options.Units.LinearMultiplier;
      deltaY = num4 / TxApplication.Options.Units.LinearMultiplier;
      deltaZ = num5 / TxApplication.Options.Units.LinearMultiplier;
    }
    TxTransformation absoluteLocation2 = (locationObject as ITxLocatableObject).AbsoluteLocation;
    if (TxTransformation.op_Inequality(absoluteLocation1, absoluteLocation2) || this._sharedLogic.LastGunAndRobotOnLocationState == CApMlmSharedLogic.eGunAndRobotOnLocationState.Success)
    {
      this.GetDeltaValues(deltaX, deltaY, deltaZ, deltaRx, deltaRy, deltaRz, out deltaValue);
      switch ((int) locationNewStatus)
      {
        case 0:
          this.txvsValueStep.QuietlyUpdateValue(newValue);
          this.LogIt(rotOrTran, axisName, oldValue, newValue, "OK", this.txvsValueStep.Value);
          break;
        case 1:
          if (flag2 && this.IsPerpendicularRotation(deltaRx, deltaRy, deltaRz))
            this.txvsValueStep.QuietlyUpdateValue(newValue);
          else
            this.txvsValueStep.QuietlyUpdateValue(oldValue);
          this.LogIt(rotOrTran, axisName, oldValue, newValue, "FAIL", this.txvsValueStep.Value);
          break;
        case 2:
          double num6 = oldValue + deltaValue;
          this.txvsValueStep.QuietlyUpdateValue(num6);
          this.LogIt(rotOrTran, axisName, oldValue, num6, "MAF", this.txvsValueStep.Value);
          break;
      }
      this.UpdateTrackbarValue();
      if (TxTransformation.op_Inequality(this.currentReferenceFrame, (TxTransformation) null))
        this._sharedLogic.GetPlacementManipulatorFrameWithLocationSet(new TxTransformation((this.txlnNavigator.LocationObject as ITxLocatableObject).AbsoluteLocation.Translation, this.currentReferenceFrame.RotationRPY_XYZ, (TxTransformation.TxRotationType) 1));
    }
    else
      this.txvsValueStep.QuietlyUpdateValue(oldValue);
    TxApplication.RefreshDisplay();
  }

  private LocationNewStatus Translate(
    double oldX,
    double newX,
    double oldY,
    double newY,
    double oldZ,
    double newZ)
  {
    ITxLocationOperation locationObject = this.txlnNavigator.LocationObject;
    TxApplication.ActiveUndoManager.StartTransaction();
    double lastLocationDelta = 0.0;
    LocationNewStatus locationStatus = (LocationNewStatus) 0;
    LocationNewStatus locationNewStatus = this._sharedLogic.Translate(oldX, newX, oldY, newY, oldZ, newZ, ref locationObject, locationStatus, ref lastLocationDelta, true, true, true, this.currentReferenceFrame);
    TxApplication.ActiveUndoManager.EndTransaction();
    return locationNewStatus;
  }

  private LocationNewStatus Rotate(
    double oldRx,
    double newRx,
    double oldRy,
    double newRy,
    double oldRz,
    double newRz)
  {
    if (this.rbX.Checked)
      return this.Rotate(oldRx, newRx);
    if (this.rbY.Checked)
      return this.Rotate(oldRy, newRy);
    return this.rbZ.Checked ? this.Rotate(oldRz, newRz) : (LocationNewStatus) 1;
  }

  private LocationNewStatus Rotate(double oldValue, double newValue)
  {
    ITxLocationOperation locationObject = this.txlnNavigator.LocationObject;
    TxAxis rotatingAxis = (TxAxis) 2;
    if (this.rbX.Checked)
      rotatingAxis = (TxAxis) 0;
    if (this.rbY.Checked)
      rotatingAxis = (TxAxis) 1;
    else if (this.rbZ.Checked)
      rotatingAxis = (TxAxis) 2;
    TxApplication.ActiveUndoManager.StartTransaction();
    double lastLocationDelta = 0.0;
    LocationNewStatus locationStatus = (LocationNewStatus) 0;
    LocationNewStatus locationNewStatus = this._sharedLogic.Rotate(oldValue, newValue, rotatingAxis, ref locationObject, locationStatus, ref lastLocationDelta, true, true, true, this.currentReferenceFrame);
    TxApplication.ActiveUndoManager.EndTransaction();
    return locationNewStatus;
  }

  private void btnReset_Click(object sender, EventArgs e)
  {
    TxApplication.ActiveUndoManager.StartTransaction();
    this._sharedLogic.RobotFollowMode(this.txlnNavigator.LocationObject, !this.cbFollowMode.Checked);
    this._sharedLogic.ResetGunAndRobotPose();
    if (this.txlnNavigator.LocationObject != null)
    {
      if (this.txlnNavigator.LocationObject is TxWeldLocationOperation)
        (this.txlnNavigator.LocationObject as TxWeldLocationOperation).ProjectedLocation = new TxTransformation(this._originalProjectedLocationTransformation);
      else if (this.txlnNavigator.LocationObject is TxRoboticSeamLocationOperation)
        TxRoboticSeamLocationOperationEx.SetProjectedLocation(this.txlnNavigator.LocationObject as TxRoboticSeamLocationOperation, this._originalProjectedLocationTransformation);
      (this.txlnNavigator.LocationObject as ITxLocatableObject).AbsoluteLocation = new TxTransformation(this._originalAbsoluteLocationTransformation);
    }
    this.UpdateDialogControls();
    this.LocationGraphicsRefresh();
    TxApplication.ActiveUndoManager.EndTransaction();
  }

  private void UpdateDialogControls()
  {
    string str = "";
    if (this.txlnNavigator.LocationObject is TxRoboticSeamLocationOperation)
      str = MlmStringTable.MLM_APPLY_ROTATION_AXIS_NORMAL;
    else if (this.txlnNavigator.LocationObject is TxWeldLocationOperation)
      str = MlmStringTable.MLM_APPLY_ROTATION_AXIS_PERPENDICULAR;
    this.txbcbApplyAxis.SelectAction(str);
    this.txvsValueStep.QuietlyUpdateValue(0.0);
    this.UpdateTrackBarLimits();
    this.UpdateTrackbarValue();
    this.UpdateTrackbarLinearUnlimitedLimits();
  }

  private void RefreshManipulatorDisplay()
  {
    try
    {
      if (this.initializing)
        return;
      this._placementManipulator.Deactivate();
      if (this.txlnNavigator.LocationObject == null)
        return;
      ITxLocatableObject locationObject = this.txlnNavigator.LocationObject as ITxLocatableObject;
      this._placementManipulator.Activate(new TxPlacementManipulatorParameters(!TxTransformation.op_Inequality(this.currentReferenceFrame, (TxTransformation) null) ? (ITxObject) locationObject : (ITxObject) this._sharedLogic.GetPlacementManipulatorFrameWithLocationSet(new TxTransformation(locationObject.AbsoluteLocation.Translation, this.currentReferenceFrame.RotationRPY_XYZ, (TxTransformation.TxRotationType) 1)), (TxPlacementManipulatorPosition) 1), new Action<TxTransformation>(this.ManipulateViaPlacement));
      this.RefreshPlacementManipulatorAxes();
      this.RefreshPlacementManipulatorReferenceFrame();
    }
    catch
    {
    }
    finally
    {
      TxApplication.RefreshDisplay();
      ((Control) this).Focus();
    }
  }

  private void RefreshPlacementManipulatorReferenceFrame()
  {
    string name = (string) null;
    TxTransformation location = (TxTransformation) null;
    if (this.m_relativeToOriginalProjectionRdBtn.Checked)
    {
      name = this._sharedLogic.ProjectionFrameDisplayName;
      location = this._sharedLogic.ProjectionFrameLocation;
    }
    else if (this.m_relativeToFrameRdBtn.Checked)
    {
      name = this._currentReferenceFrameName;
      location = this._currentReferenceFrame;
    }
    this._placementManipulator.RefreshReferenceFrame(name, location);
  }

  private void _placementManipulator_ElementPicked()
  {
    if (!this._placementManipulator.IsActive())
      return;
    try
    {
      this._manipulateViaPlacement = true;
      switch ((int) this._placementManipulator.SelectedAxis)
      {
        case 0:
        case 10:
        case 12:
        case 14:
          this.rbX.Checked = false;
          this.rbY.Checked = false;
          this.rbZ.Checked = false;
          break;
        case 1:
          this.rbTranslation.Checked = true;
          this.rbX.Checked = true;
          break;
        case 2:
          this.rbRotation.Checked = true;
          this.rbX.Checked = true;
          break;
        case 4:
          this.rbTranslation.Checked = true;
          this.rbY.Checked = true;
          break;
        case 5:
          this.rbRotation.Checked = true;
          this.rbY.Checked = true;
          break;
        case 7:
          this.rbTranslation.Checked = true;
          this.rbZ.Checked = true;
          break;
        case 8:
          this.rbRotation.Checked = true;
          this.rbZ.Checked = true;
          break;
      }
    }
    finally
    {
      this._manipulateViaPlacement = false;
    }
  }

  private void ManipulateViaPlacement(TxTransformation deltaTransformation)
  {
    double oldX = 0.0;
    double newX = 0.0;
    double oldY = 0.0;
    double newY = 0.0;
    double oldZ = 0.0;
    double newZ = 0.0;
    double oldRx = 0.0;
    double newRx = 0.0;
    double oldRy = 0.0;
    double newRy = 0.0;
    double oldRz = 0.0;
    double newRz = 0.0;
    this._manipulateViaPlacement = true;
    bool isPlaneSelected = this._placementManipulator.IsPlaneSelected;
    if (!TxDoubleExtension.AlmostEquals(deltaTransformation.Translation.X, 0.0) || !TxDoubleExtension.AlmostEquals(deltaTransformation.Translation.Y, 0.0) || !TxDoubleExtension.AlmostEquals(deltaTransformation.Translation.Z, 0.0))
    {
      this.rbTranslation.Checked = true;
      if (!TxDoubleExtension.AlmostEquals(deltaTransformation.Translation.X, 0.0))
      {
        this.rbX.Checked = !isPlaneSelected;
        oldX = this.txvsValueStep.Value;
        newX = oldX + deltaTransformation.Translation.X / TxApplication.Options.Units.LinearMultiplier;
      }
      if (!TxDoubleExtension.AlmostEquals(deltaTransformation.Translation.Y, 0.0))
      {
        this.rbY.Checked = !isPlaneSelected;
        oldY = this.txvsValueStep.Value;
        newY = oldY + deltaTransformation.Translation.Y / TxApplication.Options.Units.LinearMultiplier;
      }
      if (!TxDoubleExtension.AlmostEquals(deltaTransformation.Translation.Z, 0.0))
      {
        this.rbZ.Checked = !isPlaneSelected;
        oldZ = this.txvsValueStep.Value;
        newZ = oldZ + deltaTransformation.Translation.Z / TxApplication.Options.Units.LinearMultiplier;
      }
    }
    if (!TxDoubleExtension.AlmostEquals(deltaTransformation.RotationRPY_XYZ.X, 0.0) || !TxDoubleExtension.AlmostEquals(deltaTransformation.RotationRPY_XYZ.Y, 0.0) || !TxDoubleExtension.AlmostEquals(deltaTransformation.RotationRPY_XYZ.Z, 0.0))
    {
      this.rbRotation.Checked = true;
      if (!TxDoubleExtension.AlmostEquals(deltaTransformation.RotationRPY_XYZ.X, 0.0))
      {
        this.rbX.Checked = !isPlaneSelected;
        oldRx = this.txvsValueStep.Value;
        newRx = oldRx + deltaTransformation.RotationRPY_XYZ.X / TxApplication.Options.Units.AngularMultiplier;
      }
      if (!TxDoubleExtension.AlmostEquals(deltaTransformation.RotationRPY_XYZ.Y, 0.0))
      {
        this.rbY.Checked = !isPlaneSelected;
        oldRy = this.txvsValueStep.Value;
        newRy = oldRy + deltaTransformation.RotationRPY_XYZ.Y / TxApplication.Options.Units.AngularMultiplier;
      }
      if (!TxDoubleExtension.AlmostEquals(deltaTransformation.RotationRPY_XYZ.Z, 0.0))
      {
        this.rbZ.Checked = !isPlaneSelected;
        oldRz = this.txvsValueStep.Value;
        newRz = oldRz + deltaTransformation.RotationRPY_XYZ.Z / TxApplication.Options.Units.AngularMultiplier;
      }
    }
    try
    {
      this.Manipulate(oldX, newX, oldY, newY, oldZ, newZ, oldRx, newRx, oldRy, newRy, oldRz, newRz);
    }
    finally
    {
      this._manipulateViaPlacement = false;
    }
    if (isPlaneSelected)
      this.txvsValueStep.QuietlyUpdateValue(0.0);
    this.UpdateTrackbarLinearUnlimitedLimits();
  }

  private void LoadStepSize()
  {
    string translationValue = MlmStringTable.REGISTRY_TRANSLATION_VALUE;
    string registryRotationValue = MlmStringTable.REGISTRY_ROTATION_VALUE;
    object obj1 = (object) null;
    object obj2 = (object) null;
    TxFormSettings.RestoreFormValue((Form) this, translationValue, ref obj1);
    TxFormSettings.RestoreFormValue((Form) this, registryRotationValue, ref obj2);
    double result1;
    if (obj1 != null && double.TryParse(obj1.ToString(), out result1))
      this.txvsValueStep.LinearStep = result1 / TxApplication.Options.Units.LinearMultiplier;
    double result2;
    if (obj2 == null || !double.TryParse(obj2.ToString(), out result2))
      return;
    this.txvsValueStep.AngularStep = result2 / TxApplication.Options.Units.AngularMultiplier;
  }

  private void StoreStepSize()
  {
    string translationValue = MlmStringTable.REGISTRY_TRANSLATION_VALUE;
    string registryRotationValue = MlmStringTable.REGISTRY_ROTATION_VALUE;
    double num1 = this.txvsValueStep.LinearStep * TxApplication.Options.Units.LinearMultiplier;
    double num2 = this.txvsValueStep.AngularStep * TxApplication.Options.Units.AngularMultiplier;
    TxFormSettings.StoreFormValue((Form) this, translationValue, (object) num1);
    TxFormSettings.StoreFormValue((Form) this, registryRotationValue, (object) num2);
  }

  private void StoreFollowMode()
  {
    TxFormSettings.StoreFormValue((Form) this, MlmStringTable.REGISTRY_FOLLOW_MODE_VALUE, (object) this.cbFollowMode.Checked);
  }

  private void LoadFollowMode()
  {
    this.cbFollowMode.Checked = CApMlmSharedLogic.GetBoolValueFromRegistry((Form) this, MlmStringTable.REGISTRY_FOLLOW_MODE_VALUE);
    CApMlmSharedLogic.SetActiveControlState(this.cbFollowMode);
    this.RefreshFollowMode();
  }

  private void UpdateTrackBarLimits()
  {
    if (this.txlnNavigator.LocationObject == null)
      return;
    TxLocationManipulationEx locationManipulationEx = new TxLocationManipulationEx((ITxObject) this.txlnNavigator.LocationObject, true, true);
    if (this.rbRotation.Checked)
    {
      if (this.rbX.Checked)
        locationManipulationEx.GetAxisRotationLimit((ReferenceAxis) 0, ref this._positiveTrackerLimit, ref this._negativeTrackerLimit);
      else if (this.rbY.Checked)
        locationManipulationEx.GetAxisRotationLimit((ReferenceAxis) 1, ref this._positiveTrackerLimit, ref this._negativeTrackerLimit);
      else
        locationManipulationEx.GetAxisRotationLimit((ReferenceAxis) 2, ref this._positiveTrackerLimit, ref this._negativeTrackerLimit);
      this._positiveTrackerLimit /= TxApplication.Options.Units.AngularMultiplier;
      this._negativeTrackerLimit /= TxApplication.Options.Units.AngularMultiplier;
      this._positiveTrackerLimit = Math.Round(this._positiveTrackerLimit, TxApplication.Options.Units.AngularDigitsAfterDecimalPoint);
      this._negativeTrackerLimit = Math.Round(this._negativeTrackerLimit, TxApplication.Options.Units.AngularDigitsAfterDecimalPoint);
    }
    else
    {
      if (this.rbX.Checked)
        locationManipulationEx.GetAxisTranslationLimit(this.currentReferenceFrame, (ReferenceAxis) 0, ref this._positiveTrackerLimit, ref this._negativeTrackerLimit);
      else if (this.rbY.Checked)
        locationManipulationEx.GetAxisTranslationLimit(this.currentReferenceFrame, (ReferenceAxis) 1, ref this._positiveTrackerLimit, ref this._negativeTrackerLimit);
      else
        locationManipulationEx.GetAxisTranslationLimit(this.currentReferenceFrame, (ReferenceAxis) 2, ref this._positiveTrackerLimit, ref this._negativeTrackerLimit);
      this._positiveTrackerLimit /= TxApplication.Options.Units.LinearMultiplier;
      this._negativeTrackerLimit /= TxApplication.Options.Units.LinearMultiplier;
      this._positiveTrackerLimit = Math.Round(this._positiveTrackerLimit, TxApplication.Options.Units.LinearDigitsAfterDecimalPoint);
      this._negativeTrackerLimit = Math.Round(this._negativeTrackerLimit, TxApplication.Options.Units.LinearDigitsAfterDecimalPoint);
    }
    this._trackerMultiplier = Math.Pow(10.0, (double) Math.Max(CCUiMlmSingleLocationManipulationDlg.GetMagnitudeOfNumber(Math.Abs(this._negativeTrackerLimit), 10), CCUiMlmSingleLocationManipulationDlg.GetMagnitudeOfNumber(Math.Abs(this._positiveTrackerLimit), 10)));
    this._negativeTrackerLimit *= this._trackerMultiplier;
    this._positiveTrackerLimit *= this._trackerMultiplier;
    this.tbValueTracker.Maximum = (int) this._positiveTrackerLimit;
    this.tbValueTracker.Minimum = (int) this._negativeTrackerLimit;
  }

  private static int GetMagnitudeOfNumber(double val, int magnitudeReference)
  {
    int magnitudeOfNumber = 0;
    while (!TxDoubleExtension.AlmostEquals(val, 0.0) && val < (double) magnitudeReference)
    {
      val *= 10.0;
      ++magnitudeOfNumber;
    }
    return magnitudeOfNumber;
  }

  private void tbValueTracker_Scroll(object sender, EventArgs e)
  {
    this.txvsValueStep.Value = (double) this.tbValueTracker.Value / this._trackerMultiplier;
  }

  private void tbValueTracker_MouseUp(object sender, MouseEventArgs e)
  {
    this.UpdateTrackbarLinearUnlimitedLimits();
  }

  private void UpdateTrackbarLinearUnlimitedLimits()
  {
    if (!this.rbX.Enabled && !this.rbY.Enabled && !this.rbZ.Enabled)
      return;
    double num1 = this.txvsValueStep.Value;
    int num2 = Math.Abs(this.tbValueTracker.Maximum);
    int num3 = Math.Abs(this.tbValueTracker.Minimum);
    int num4 = (int) ((double) TxLocationManipulationEx.UNLIMITED_TRANSLATION_STEP_VALUE / TxApplication.Options.Units.LinearMultiplier);
    int num5 = num2 % num4;
    int num6 = num3 % num4;
    if (!(this.rbTranslation.Checked & (num5 == 0 && num6 == 0)))
      return;
    if (num1 > (double) this.tbValueTracker.Maximum)
    {
      while (num1 >= (double) this.tbValueTracker.Maximum)
      {
        this.tbValueTracker.Maximum += num4;
        this.tbValueTracker.Minimum += num4;
        this._negativeTrackerLimit = (double) this.tbValueTracker.Minimum;
        this._positiveTrackerLimit = (double) this.tbValueTracker.Maximum;
        this.UpdateTrackbarLimitLabels();
      }
    }
    else
    {
      if (num1 >= (double) this.tbValueTracker.Minimum)
        return;
      while (num1 <= (double) this.tbValueTracker.Minimum)
      {
        this.tbValueTracker.Minimum -= num4;
        this.tbValueTracker.Maximum -= num4;
        this._negativeTrackerLimit = (double) this.tbValueTracker.Minimum;
        this._positiveTrackerLimit = (double) this.tbValueTracker.Maximum;
        this.UpdateTrackbarLimitLabels();
      }
    }
  }

  private void UpdateTrackbarValue()
  {
    double num1 = 1.0;
    double newVal;
    if (this.rbRotation.Checked)
    {
      double angularMultiplier = TxApplication.Options.Units.AngularMultiplier;
      newVal = CApMlmSharedLogic.GetBoundedAngle(this.txvsValueStep.Value * angularMultiplier) / angularMultiplier;
    }
    else
    {
      num1 = TxApplication.Options.Units.LinearMultiplier;
      newVal = this.txvsValueStep.Value;
    }
    int num2 = (int) Math.Round(newVal * this._trackerMultiplier);
    if (num2 <= this.tbValueTracker.Maximum && num2 >= this.tbValueTracker.Minimum)
    {
      this.tbValueTracker.Value = num2;
      this.txvsValueStep.QuietlyUpdateValue(newVal);
    }
    this.UpdateTrackbarLimitLabels();
  }

  private void UpdateTrackbarLimitLabels()
  {
    int num = 1;
    for (int trackerMultiplier = (int) this._trackerMultiplier; trackerMultiplier >= 10; trackerMultiplier /= 10)
      ++num;
    this.lblMin.Text = (this._negativeTrackerLimit / this._trackerMultiplier).ToString("F" + num.ToString());
    this.lblMax.Text = (this._positiveTrackerLimit / this._trackerMultiplier).ToString("F" + num.ToString());
  }

  private void ResetTrackbarValue()
  {
    if (this.txvsValueStep.Value != 0.0)
      this.txvsValueStep.Value = 0.0;
    this.tbValueTracker.Value = (this.tbValueTracker.Minimum + this.tbValueTracker.Maximum) / 2;
  }

  private bool IsArcLocation(ITxRoboticLocationOperation location)
  {
    return location != null && ((ITxObject) location).Collection is TxRoboticSeamOperation && TxProjectionEx.WasSeamOperationProjectedAsARC(((ITxObject) location).Collection as TxRoboticSeamOperation);
  }

  private bool CanManipulateArcLocation(ITxRoboticLocationOperation location)
  {
    bool flag = true;
    if (location != null && this.IsArcLocation(location) && TxMessageBox.Show(MlmStringTable.ResourceManager.GetString("MLM_ARC_SEAM_ONE_LOCATION_WARNING_MESSAGE"), MlmStringTable.ResourceManager.GetString("MLM_ARC_SEAM_ONE_LOCATION_WARNING_TITLE"), MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) == DialogResult.No)
      flag = false;
    return flag;
  }

  private bool IsPerpendicularRotation(double deltaRx, double deltaRy, double deltaRz)
  {
    bool flag = false;
    switch (this.txlnNavigator.LocationObject)
    {
      case TxWeldLocationOperation _:
        switch ((int) TxApplication.Options.Weld.Perpendicular)
        {
          case 0:
            flag = deltaRx != 0.0 && deltaRy == 0.0 && deltaRz == 0.0;
            break;
          case 1:
            flag = deltaRy != 0.0 && deltaRx == 0.0 && deltaRz == 0.0;
            break;
          case 2:
            flag = deltaRz != 0.0 && deltaRx == 0.0 && deltaRy == 0.0;
            break;
        }
        break;
      case TxRoboticSeamLocationOperation _:
        switch ((int) TxApplication.Options.Continuous.Normal)
        {
          case 0:
          case 3:
            flag = deltaRx != 0.0 && deltaRy == 0.0 && deltaRz == 0.0;
            break;
          case 1:
          case 4:
            flag = deltaRy != 0.0 && deltaRx == 0.0 && deltaRz == 0.0;
            break;
          case 2:
          case 5:
            flag = deltaRz != 0.0 && deltaRx == 0.0 && deltaRy == 0.0;
            break;
        }
        break;
    }
    return flag;
  }

  private void LocationGraphicsRefresh()
  {
    this.RefreshFollowMode();
    this._sharedLogic.GraphicsRefresh();
  }

  private void tsbResetLocationsAbsoluteLocation_Click(object sender, EventArgs e)
  {
    if (!(this.txlnNavigator.LocationObject is ITxRoboticLocationOperation))
      return;
    this._sharedLogic.ResetAbsoluteLocation(this.txlnNavigator.LocationObject as ITxRoboticLocationOperation);
    this.UpdateDialogControls();
    this.LocationGraphicsRefresh();
  }

  private void tsbSnapLocationsToMaxAllowed_Click(object sender, EventArgs e)
  {
    if (!(this.txlnNavigator.LocationObject is ITxRoboticLocationOperation))
      return;
    this._sharedLogic.SnapToMaxAloowed(this.txlnNavigator.LocationObject as ITxRoboticLocationOperation);
    this.UpdateDialogControls();
    this.LocationGraphicsRefresh();
  }

  private void tsbFlipLocation1_Click(object sender, EventArgs e)
  {
    if (this.txlnNavigator.LocationObject == null)
      return;
    TxCommandManager txCommandManager = new TxCommandManager();
    TxObjectList txObjectList = new TxObjectList();
    ((Collection<ITxObject>) txObjectList).Add((ITxObject) this.txlnNavigator.LocationObject);
    txCommandManager.ExecuteCommandByCommandProgId("WeldLocationsManipulation.FlipLocsCmd.1", (object) txObjectList, false);
    this.LocationGraphicsRefresh();
  }

  private void tsbFlipLocation2_Click(object sender, EventArgs e)
  {
    if (this.txlnNavigator.LocationObject == null)
      return;
    TxCommandManager txCommandManager = new TxCommandManager();
    TxObjectList txObjectList = new TxObjectList();
    ((Collection<ITxObject>) txObjectList).Add((ITxObject) this.txlnNavigator.LocationObject);
    txCommandManager.ExecuteCommandByCommandProgId("CCoAFWFlipWeldLocationCmd", (object) txObjectList, false);
  }

  private void tsbShowCone_Click(object sender, EventArgs e)
  {
    this._sharedLogic.Location = (ITxLocationOperation) (this.txlnNavigator.LocationObject as ITxRoboticLocationOperation);
    bool flag = ((ToolStripButton) this.tsbShowCone).Checked && !this._sharedLogic.CanCreateConeManipulator();
    if (flag)
      ((ToolStripButton) this.tsbShowCone).Checked = false;
    this._sharedLogic.ShowConeManipulator = ((ToolStripButton) this.tsbShowCone).Checked;
    this._sharedLogic.GraphicsRefresh();
    if (((ToolStripButton) this.tsbShowCone).Checked)
      this._sharedLogic.ZoomToSelection();
    if (!flag)
      return;
    int num = (int) TxMessageBox.ShowModal(MlmStringTable.ResourceManager.GetString("MLM_SHOW_LOCATION_LIMITS_INFO"), MlmStringTable.ResourceManager.GetString("MULTIPLE_LOCATIONS_MANIPULATION_NAME"), MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  }

  private void UpdateTrackBarAndDisplay()
  {
    this.UpdateTrackBarLimits();
    this.UpdateTrackbarValue();
    this.RefreshManipulatorDisplay();
  }

  private void m_relativeToOriginalProjectionRdBtn_CheckedChanged(object sender, EventArgs e)
  {
    this._sharedLogic.UpdateProjectionFrame(this.m_relativeToOriginalProjectionRdBtn.Checked, this._originalProjectedLocationTransformation);
    if (!this.m_relativeToOriginalProjectionRdBtn.Checked && !this.m_relativeToSelfFrameRdBtn.Checked)
      return;
    this.UpdateTrackBarAndDisplay();
  }

  private void m_relativeToFrameRdBtn_CheckedChanged(object sender, EventArgs e)
  {
    if (this.m_relativeToFrameRdBtn.Checked)
    {
      this.RefFrameLoseGainFocus(true);
    }
    else
    {
      this.RefFrameLoseGainFocus(false);
      this.txlnNavigator.ListenToPick = true;
      ((Control) this.txlnNavigator).Focus();
    }
    if (!this.m_relativeToFrameRdBtn.Checked && !this.m_relativeToSelfFrameRdBtn.Checked)
      return;
    this.UpdateTrackBarAndDisplay();
  }

  private void m_txFrameComboBoxCtrlRelative_LostFocus(object sender, EventArgs e)
  {
    if (this.isFrameOfReferenceValid)
      return;
    this.m_txFrameComboBoxCtrlRelative.SelectFrame(MlmStringTable.ResourceManager.GetString("MLM_WORKING_FRAME"));
  }

  private void m_txFrameComboBoxCtrlRelative_ValidFrameSet(
    object sender,
    TxFrameComboBoxCtrl_ValidFrameSetEventArgs args)
  {
    this.isFrameOfReferenceValid = true;
    this._currentReferenceFrame = args.Location;
    this._currentReferenceFrameName = ((Control) this.m_txFrameComboBoxCtrlRelative).Text;
    this._sharedLogic.ClearBoldFrame();
    this._sharedLogic.CreateBoldFrame(args.Location);
    if (!this._manipulateViaPlacement)
      this.RefreshManipulatorDisplay();
    this.UpdateTrackBarLimits();
    this.UpdateTrackbarValue();
    if (this._manipulateViaPlacement)
      return;
    TxApplication.RefreshDisplay();
  }

  private void m_txFrameComboBoxCtrlRelative_InvalidFrameSet(
    object sender,
    TxFrameComboBoxCtrl_InvalidFrameSetEventArgs args)
  {
    this.isFrameOfReferenceValid = false;
  }

  private void RefFrameLoseGainFocus(bool focus)
  {
    if (focus)
    {
      this._sharedLogic.DisplayBoldFrame();
      this.m_txFrameComboBoxCtrlRelative.Enabled = focus;
      this.m_txFrameComboBoxCtrlRelative.ListenToPick = focus;
    }
    else
    {
      this._sharedLogic.BlankBoldFrame();
      this.m_txFrameComboBoxCtrlRelative.ListenToPick = focus;
      this.m_txFrameComboBoxCtrlRelative.Enabled = focus;
    }
    this.m_txFrameComboBoxCtrlRelative.Focus();
    ((Control) this.m_txFrameComboBoxCtrlRelative).Refresh();
  }

  private bool IsWeldOrSeamLocationOperation(ITxLocationOperation operation)
  {
    return operation != null && this.WeldSeamLocationOperation.DoesPassFilter((ITxObject) operation);
  }

  protected virtual void Dispose(bool disposing)
  {
    if (disposing && this.components != null)
      this.components.Dispose();
    base.Dispose(disposing);
  }

  private void InitializeComponent()
  {
    this.components = (IContainer) new Container();
    ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (CCUiMlmSingleLocationManipulationDlg));
    this.rbRotation = new RadioButton();
    this.rbTranslation = new RadioButton();
    this.ilSmallButtonsImages = new ImageList(this.components);
    this.ilLargeButtonsImages = new ImageList(this.components);
    this.ttButtonsTooltip = new ToolTip(this.components);
    this.rbX = new RadioButton();
    this.rbY = new RadioButton();
    this.rbZ = new RadioButton();
    this.tbValueTracker = (TrackBar) new TxTrackBar();
    this.btnReset = new Button();
    this.btnClose = new Button();
    this.cbFollowMode = (CheckBox) new TxCheckBox();
    this.panel1 = new Panel();
    this.panel2 = new Panel();
    this.txlnNavigator = new TxLocationNavigator();
    this.txbcbApplyAxis = new TxButtonComboBox();
    this.txvsValueStep = new TxValueStep();
    this.lblMin = new Label();
    this.lblMax = new Label();
    this.tsSLM = new TxToolStrip();
    this.tsbResetLocationsAbsoluteLocation = new TxToolStripButton();
    this.tsbSnapLocationsToMaxAllowed = new TxToolStripButton();
    this.toolStripDropDownButton1 = new TxToolStripDropDownButton();
    this.tsbFlipLocation1 = new TxToolStripMenuItem();
    this.tsbFlipLocation2 = new TxToolStripMenuItem();
    this.toolStripSeparator1 = new ToolStripSeparator();
    this.tsbShowCone = new TxToolStripButton();
    this.groupBox1 = new GroupBox();
    this.groupBox2 = new GroupBox();
    this.m_relativeToOriginalProjectionRdBtn = new RadioButton();
    this.m_txFrameComboBoxCtrlRelative = new TxFrameComboBoxCtrl();
    this.m_relativeToFrameRdBtn = new RadioButton();
    this.m_relativeToSelfFrameRdBtn = new RadioButton();
    this.tbValueTracker.BeginInit();
    this.panel1.SuspendLayout();
    this.panel2.SuspendLayout();
    ((Control) this.tsSLM).SuspendLayout();
    this.groupBox1.SuspendLayout();
    this.groupBox2.SuspendLayout();
    ((Control) this).SuspendLayout();
    componentResourceManager.ApplyResources((object) this.rbRotation, "rbRotation");
    this.rbRotation.Checked = true;
    this.rbRotation.Name = "rbRotation";
    this.rbRotation.TabStop = true;
    this.rbRotation.UseVisualStyleBackColor = true;
    this.rbRotation.CheckedChanged += new EventHandler(this.rbRotation_CheckedChanged);
    componentResourceManager.ApplyResources((object) this.rbTranslation, "rbTranslation");
    this.rbTranslation.Name = "rbTranslation";
    this.rbTranslation.TabStop = true;
    this.rbTranslation.UseVisualStyleBackColor = true;
    this.rbTranslation.CheckedChanged += new EventHandler(this.rbTranslation_CheckedChanged);
    this.ilSmallButtonsImages.ImageStream = (ImageListStreamer) componentResourceManager.GetObject("ilSmallButtonsImages.ImageStream");
    this.ilSmallButtonsImages.TransparentColor = Color.Fuchsia;
    this.ilSmallButtonsImages.Images.SetKeyName(0, "MoveLeft.png");
    this.ilSmallButtonsImages.Images.SetKeyName(1, "MoveRight.png");
    this.ilLargeButtonsImages.ImageStream = (ImageListStreamer) componentResourceManager.GetObject("ilLargeButtonsImages.ImageStream");
    this.ilLargeButtonsImages.TransparentColor = Color.Fuchsia;
    this.ilLargeButtonsImages.Images.SetKeyName(0, "RotateApproach.bmp");
    this.ilLargeButtonsImages.Images.SetKeyName(1, "RotateNormal.bmp");
    this.ilLargeButtonsImages.Images.SetKeyName(2, "RotateThird.bmp");
    this.ilLargeButtonsImages.Images.SetKeyName(3, "TranslateNormal.bmp");
    this.ilLargeButtonsImages.Images.SetKeyName(4, "FollowMode.png");
    this.ilLargeButtonsImages.Images.SetKeyName(5, "SnapToMaxAllowed.png");
    this.ilLargeButtonsImages.Images.SetKeyName(6, "ResetAbsoluteLocation.png");
    this.ilLargeButtonsImages.Images.SetKeyName(7, "ShowCone.png");
    this.ilLargeButtonsImages.Images.SetKeyName(8, "FlipLocation.png");
    componentResourceManager.ApplyResources((object) this.rbX, "rbX");
    this.rbX.Checked = true;
    this.rbX.Name = "rbX";
    this.rbX.TabStop = true;
    this.ttButtonsTooltip.SetToolTip((Control) this.rbX, componentResourceManager.GetString("rbX.ToolTip"));
    this.rbX.UseVisualStyleBackColor = true;
    this.rbX.CheckedChanged += new EventHandler(this.rbX_CheckedChanged);
    componentResourceManager.ApplyResources((object) this.rbY, "rbY");
    this.rbY.Name = "rbY";
    this.rbY.TabStop = true;
    this.ttButtonsTooltip.SetToolTip((Control) this.rbY, componentResourceManager.GetString("rbY.ToolTip"));
    this.rbY.UseVisualStyleBackColor = true;
    this.rbY.CheckedChanged += new EventHandler(this.rbY_CheckedChanged);
    componentResourceManager.ApplyResources((object) this.rbZ, "rbZ");
    this.rbZ.Name = "rbZ";
    this.rbZ.TabStop = true;
    this.ttButtonsTooltip.SetToolTip((Control) this.rbZ, componentResourceManager.GetString("rbZ.ToolTip"));
    this.rbZ.UseVisualStyleBackColor = true;
    this.rbZ.CheckedChanged += new EventHandler(this.rbZ_CheckedChanged);
    componentResourceManager.ApplyResources((object) this.tbValueTracker, "tbValueTracker");
    this.tbValueTracker.Name = "tbValueTracker";
    this.tbValueTracker.TickStyle = TickStyle.None;
    this.tbValueTracker.Value = 5;
    this.tbValueTracker.Scroll += new EventHandler(this.tbValueTracker_Scroll);
    this.tbValueTracker.MouseUp += new MouseEventHandler(this.tbValueTracker_MouseUp);
    componentResourceManager.ApplyResources((object) this.btnReset, "btnReset");
    this.btnReset.Name = "btnReset";
    this.btnReset.UseVisualStyleBackColor = true;
    this.btnReset.Click += new EventHandler(this.btnReset_Click);
    componentResourceManager.ApplyResources((object) this.btnClose, "btnClose");
    this.btnClose.Name = "btnClose";
    this.btnClose.UseVisualStyleBackColor = true;
    this.btnClose.Click += new EventHandler(this.btnClose_Click);
    componentResourceManager.ApplyResources((object) this.cbFollowMode, "cbFollowMode");
    this.cbFollowMode.ImageList = this.ilLargeButtonsImages;
    this.cbFollowMode.Name = "cbFollowMode";
    this.cbFollowMode.UseVisualStyleBackColor = true;
    this.cbFollowMode.Click += new EventHandler(this.cbFollowMode_Click);
    componentResourceManager.ApplyResources((object) this.panel1, "panel1");
    this.panel1.Controls.Add((Control) this.rbRotation);
    this.panel1.Controls.Add((Control) this.rbTranslation);
    this.panel1.Name = "panel1";
    componentResourceManager.ApplyResources((object) this.panel2, "panel2");
    this.panel2.Controls.Add((Control) this.rbX);
    this.panel2.Controls.Add((Control) this.rbZ);
    this.panel2.Controls.Add((Control) this.rbY);
    this.panel2.Name = "panel2";
    componentResourceManager.ApplyResources((object) this.txlnNavigator, "txlnNavigator");
    this.txlnNavigator.LocationObject = (ITxLocationOperation) null;
    ((Control) this.txlnNavigator).Name = "txlnNavigator";
    componentResourceManager.ApplyResources((object) this.txbcbApplyAxis, "txbcbApplyAxis");
    ((Control) this.txbcbApplyAxis).Name = "txbcbApplyAxis";
    this.txbcbApplyAxis.SelectedAction = 0;
    this.txbcbApplyAxis.FireAction += new TxButtonComboBox.FireActionEventHandler(this.txbcbApplyAxis_FireAction);
    componentResourceManager.ApplyResources((object) this.txvsValueStep, "txvsValueStep");
    this.txvsValueStep.AngularStep = 4.1088175182844108E+25;
    this.txvsValueStep.LinearStep = 100.0;
    ((Control) this.txvsValueStep).Name = "txvsValueStep";
    this.txvsValueStep.Step = 4.1088175182844108E+25;
    this.txvsValueStep.Type = TxValueStepType.Angular;
    this.txvsValueStep.Value = 0.0;
    this.txvsValueStep.ValueChanged += new TxValueStep.TxValueStepValueChangeEventHandler(this.txvsValueStep_ValueChanged);
    componentResourceManager.ApplyResources((object) this.lblMin, "lblMin");
    this.lblMin.Name = "lblMin";
    componentResourceManager.ApplyResources((object) this.lblMax, "lblMax");
    this.lblMax.Name = "lblMax";
    this.tsSLM.ClickThrough = true;
    ((ToolStrip) this.tsSLM).GripStyle = ToolStripGripStyle.Hidden;
    ((ToolStrip) this.tsSLM).Items.AddRange(new ToolStripItem[5]
    {
      (ToolStripItem) this.tsbResetLocationsAbsoluteLocation,
      (ToolStripItem) this.tsbSnapLocationsToMaxAllowed,
      (ToolStripItem) this.toolStripDropDownButton1,
      (ToolStripItem) this.toolStripSeparator1,
      (ToolStripItem) this.tsbShowCone
    });
    componentResourceManager.ApplyResources((object) this.tsSLM, "tsSLM");
    ((Control) this.tsSLM).Name = "tsSLM";
    ((ToolStripItem) this.tsbResetLocationsAbsoluteLocation).DisplayStyle = ToolStripItemDisplayStyle.Image;
    componentResourceManager.ApplyResources((object) this.tsbResetLocationsAbsoluteLocation, "tsbResetLocationsAbsoluteLocation");
    ((ToolStripItem) this.tsbResetLocationsAbsoluteLocation).Name = "tsbResetLocationsAbsoluteLocation";
    ((ToolStripItem) this.tsbResetLocationsAbsoluteLocation).Click += new EventHandler(this.tsbResetLocationsAbsoluteLocation_Click);
    ((ToolStripItem) this.tsbSnapLocationsToMaxAllowed).DisplayStyle = ToolStripItemDisplayStyle.Image;
    componentResourceManager.ApplyResources((object) this.tsbSnapLocationsToMaxAllowed, "tsbSnapLocationsToMaxAllowed");
    ((ToolStripItem) this.tsbSnapLocationsToMaxAllowed).Name = "tsbSnapLocationsToMaxAllowed";
    ((ToolStripItem) this.tsbSnapLocationsToMaxAllowed).Click += new EventHandler(this.tsbSnapLocationsToMaxAllowed_Click);
    ((ToolStripItem) this.toolStripDropDownButton1).DisplayStyle = ToolStripItemDisplayStyle.Image;
    ((ToolStripDropDownItem) this.toolStripDropDownButton1).DropDownItems.AddRange(new ToolStripItem[2]
    {
      (ToolStripItem) this.tsbFlipLocation1,
      (ToolStripItem) this.tsbFlipLocation2
    });
    componentResourceManager.ApplyResources((object) this.toolStripDropDownButton1, "toolStripDropDownButton1");
    ((ToolStripItem) this.toolStripDropDownButton1).Name = "toolStripDropDownButton1";
    componentResourceManager.ApplyResources((object) this.tsbFlipLocation1, "tsbFlipLocation1");
    ((ToolStripItem) this.tsbFlipLocation1).Name = "tsbFlipLocation1";
    ((ToolStripItem) this.tsbFlipLocation1).Click += new EventHandler(this.tsbFlipLocation1_Click);
    componentResourceManager.ApplyResources((object) this.tsbFlipLocation2, "tsbFlipLocation2");
    ((ToolStripItem) this.tsbFlipLocation2).Name = "tsbFlipLocation2";
    ((ToolStripItem) this.tsbFlipLocation2).Click += new EventHandler(this.tsbFlipLocation2_Click);
    this.toolStripSeparator1.Name = "toolStripSeparator1";
    componentResourceManager.ApplyResources((object) this.toolStripSeparator1, "toolStripSeparator1");
    ((ToolStripButton) this.tsbShowCone).CheckOnClick = true;
    ((ToolStripItem) this.tsbShowCone).DisplayStyle = ToolStripItemDisplayStyle.Image;
    componentResourceManager.ApplyResources((object) this.tsbShowCone, "tsbShowCone");
    ((ToolStripItem) this.tsbShowCone).Name = "tsbShowCone";
    ((ToolStripItem) this.tsbShowCone).Click += new EventHandler(this.tsbShowCone_Click);
    componentResourceManager.ApplyResources((object) this.groupBox1, "groupBox1");
    this.groupBox1.Controls.Add((Control) this.tbValueTracker);
    this.groupBox1.Controls.Add((Control) this.panel1);
    this.groupBox1.Controls.Add((Control) this.txbcbApplyAxis);
    this.groupBox1.Controls.Add((Control) this.panel2);
    this.groupBox1.Controls.Add((Control) this.lblMax);
    this.groupBox1.Controls.Add((Control) this.txvsValueStep);
    this.groupBox1.Controls.Add((Control) this.lblMin);
    this.groupBox1.Name = "groupBox1";
    this.groupBox1.TabStop = false;
    componentResourceManager.ApplyResources((object) this.groupBox2, "groupBox2");
    this.groupBox2.Controls.Add((Control) this.m_relativeToOriginalProjectionRdBtn);
    this.groupBox2.Controls.Add((Control) this.m_txFrameComboBoxCtrlRelative);
    this.groupBox2.Controls.Add((Control) this.m_relativeToFrameRdBtn);
    this.groupBox2.Controls.Add((Control) this.m_relativeToSelfFrameRdBtn);
    this.groupBox2.Name = "groupBox2";
    this.groupBox2.TabStop = false;
    componentResourceManager.ApplyResources((object) this.m_relativeToOriginalProjectionRdBtn, "m_relativeToOriginalProjectionRdBtn");
    this.m_relativeToOriginalProjectionRdBtn.Name = "m_relativeToOriginalProjectionRdBtn";
    this.m_relativeToOriginalProjectionRdBtn.TabStop = true;
    this.m_relativeToOriginalProjectionRdBtn.UseVisualStyleBackColor = true;
    this.m_relativeToOriginalProjectionRdBtn.CheckedChanged += new EventHandler(this.m_relativeToOriginalProjectionRdBtn_CheckedChanged);
    componentResourceManager.ApplyResources((object) this.m_txFrameComboBoxCtrlRelative, "m_txFrameComboBoxCtrlRelative");
    this.m_txFrameComboBoxCtrlRelative.EnableAdvancedPick = true;
    this.m_txFrameComboBoxCtrlRelative.ListenToPick = false;
    ((Control) this.m_txFrameComboBoxCtrlRelative).Name = "m_txFrameComboBoxCtrlRelative";
    this.m_txFrameComboBoxCtrlRelative.PickLevel = (TxPickLevel) 6;
    this.m_txFrameComboBoxCtrlRelative.VisualizePickedFrameInGraphicViewer = false;
    componentResourceManager.ApplyResources((object) this.m_relativeToFrameRdBtn, "m_relativeToFrameRdBtn");
    this.m_relativeToFrameRdBtn.Name = "m_relativeToFrameRdBtn";
    this.m_relativeToFrameRdBtn.TabStop = true;
    this.m_relativeToFrameRdBtn.UseVisualStyleBackColor = true;
    this.m_relativeToFrameRdBtn.CheckedChanged += new EventHandler(this.m_relativeToFrameRdBtn_CheckedChanged);
    componentResourceManager.ApplyResources((object) this.m_relativeToSelfFrameRdBtn, "m_relativeToSelfFrameRdBtn");
    this.m_relativeToSelfFrameRdBtn.Checked = true;
    this.m_relativeToSelfFrameRdBtn.Name = "m_relativeToSelfFrameRdBtn";
    this.m_relativeToSelfFrameRdBtn.TabStop = true;
    this.m_relativeToSelfFrameRdBtn.UseVisualStyleBackColor = true;
    componentResourceManager.ApplyResources((object) this, "$this");
    ((ContainerControl) this).AutoScaleMode = AutoScaleMode.Font;
    ((Control) this).Controls.Add((Control) this.groupBox1);
    ((Control) this).Controls.Add((Control) this.tsSLM);
    ((Control) this).Controls.Add((Control) this.cbFollowMode);
    ((Control) this).Controls.Add((Control) this.btnClose);
    ((Control) this).Controls.Add((Control) this.btnReset);
    ((Control) this).Controls.Add((Control) this.txlnNavigator);
    ((Control) this).Controls.Add((Control) this.groupBox2);
    ((Form) this).FormBorderStyle = FormBorderStyle.FixedDialog;
    ((Form) this).MaximizeBox = false;
    ((Form) this).MinimizeBox = false;
    ((Control) this).Name = nameof (CCUiMlmSingleLocationManipulationDlg);
    this.ShouldCloseOnDocumentUnloading = true;
    ((Form) this).FormClosing += new FormClosingEventHandler(this.CCUiMlmSingleLocationManipulationDlg_FormClosing);
    ((Form) this).FormClosed += new FormClosedEventHandler(this.CCUiMlmSingleLocationManipulationDlg_FormClosed);
    ((Form) this).Load += new EventHandler(this.CCUiMlmSingleLocationManipulationDlg_Load);
    this.tbValueTracker.EndInit();
    this.panel1.ResumeLayout(false);
    this.panel1.PerformLayout();
    this.panel2.ResumeLayout(false);
    ((Control) this.tsSLM).ResumeLayout(false);
    ((Control) this.tsSLM).PerformLayout();
    this.groupBox1.ResumeLayout(false);
    this.groupBox2.ResumeLayout(false);
    this.groupBox2.PerformLayout();
    ((Control) this).ResumeLayout(false);
    ((Control) this).PerformLayout();
  }
}
